package org.doubango.FrCall.Screens;



import org.doubango.FrCall.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;

public class SearchFriendPage extends Activity {
	private Button searchFriendById;
	private Button searchFriendByName;
	private Button searchFriendByRule;
	private Button searchFriendNearby;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		ViewGroup.LayoutParams para = new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
		addContentView(LayoutInflater.from(SearchFriendPage.this).inflate(R.layout.search_friend_page, null), para);
		searchFriendById = (Button) findViewById(R.id.search_friend_by_id);
		searchFriendByName = (Button) findViewById(R.id.search_friend_by_name);
		searchFriendByRule = (Button) findViewById(R.id.search_friend_by_rule);
		searchFriendNearby = (Button) findViewById(R.id.search_friend_nearby);
		searchFriendById.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(SearchFriendPage.this, SearchFriendByIdPage.class);
				startActivity(intent);
			}
		});
		
		searchFriendByName.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(SearchFriendPage.this, SearchFriendByNicknamePage.class);
				startActivity(intent);
			}
		});
		
		searchFriendByRule.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(SearchFriendPage.this, SearchFriendByRule.class);
				startActivity(intent);
			}
		});
		
		searchFriendNearby.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(SearchFriendPage.this, SearchFriendNearbyPage.class);
				startActivity(intent);
			}
		});
	}
	
}
